package com.nuoniu.sibanyun.entity.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
import java.util.List;

@Data
@ApiModel("加工单 分单 接受类")
public class VProductionWorkMainSplitDto {

    @ApiModelProperty(value = "数据来源")
    @TableField("data_source")
    private String dataSource;

    @ApiModelProperty(value = "单据编号")
    @TableField("voucher_code")
    private String voucherCode;

    @ApiModelProperty(value = "单据日期")
    @TableField("voucher_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate voucherDate;


    @ApiModelProperty(value = "单据状态(0:未审核 1：已审核 10:关闭)")
    @TableField("voucher_state")
    private Integer voucherState;

    @ApiModelProperty(value = "业务类型")
    @TableField("business_type")
    private Integer businessType;

    @ApiModelProperty(value = "开工日期")
    @TableField("start_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate startDate;

    @ApiModelProperty(value = "完工日期")
    @TableField("finish_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate finishDate;

    @ApiModelProperty(value = "预计开工日期")
    @TableField("expect_start_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate expectStartDate;

    @ApiModelProperty(value = "预计完工日期")
    @TableField("expect_finish_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate expectFinishDate;

    @ApiModelProperty(value = "生产车间")
    @TableField("office_id")
    private Integer officeId;

    @ApiModelProperty(value = "生产车间名称")
    @TableField("office_name")
    private String officeName;

    @ApiModelProperty(value = "客户ID")
    @TableField("crm_id")
    private Integer crmId;

    @ApiModelProperty(value = "客户名称")
    @TableField("crm_name")
    private String crmName;

    @ApiModelProperty(value = "销售订单编号")
    @TableField("sale_order_code")
    private String saleOrderCode;

    @ApiModelProperty(value = "项目ID")
    @TableField("project_id")
    private Integer projectId;

    @ApiModelProperty(value = "项目名称")
    @TableField("project_name")
    private String projectName;

    @ApiModelProperty(value = "负责人ID")
    @TableField("charge_user_id")
    private Integer chargeUserId;

    @ApiModelProperty(value = "负责人姓名")
    @TableField("charge_user_name")
    private String chargeUserName;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "来源单id")
    @TableField("source_voucher_id")
    private Integer sourceVoucherId;

    @ApiModelProperty(value = "来源单号")
    @TableField("source_voucher_code")
    private String sourceVoucherCode;

    @ApiModelProperty(value = "来源日期")
    @TableField("source_voucher_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate sourceVoucherDate;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_type")
    private String sourceVoucherType;

    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;

    @ApiModelProperty(value = "待分单的 加工单明细")
    private List<VProductionWorkDetailSplitDto> orderDetailList;

}
